@import 'variables.less';

@import 'includes/help-topics.less';
@import 'includes/product-title.less';
@import 'includes/topic-list.less';
@import 'includes/download-firefox.less';
@import 'includes/download-buttons.less';

// interim fix until full design is implemented
#help-topics .product-title {
  & > h1 {
    padding-left: 20px;
  }

  & > p {
    padding-left: 188px;
  }

  .html-rtl & {
    & > h1 {
      padding-left: 0;
      padding-right: 20px;
    }

    & > p {
      padding-left: 0;
      padding-right: 188px;
    }
  }
}

.logo-sprite {
  float: left;
  margin: 0 8px 0 0;
}

.refresh-firefox {
  display: none;
  font-family: 'Open Sans','Droid Arabic Naskh','Mplus Fulah',sans-serif;
  position: absolute;
  right: 0;
  text-align: center;
  top: 0;

  > a {
    color: #999;
    display: block;
  }

  .help-text {
    font-size: 18px;
    margin-bottom: 4px;
  }

  .reset-link {
    font-size: 0.7em;
    margin-bottom: 6px;
  }

  > .btn.btn-submit {
    font-family: @OpenSans;
    font-size: 18px;
    padding: 10px 30px;
  }
}

.topic-title {
  margin-bottom: 0;

  &.has-image {
    display: flex;
    height: 96px;
    flex-direction: column;
    justify-content: center;
  }

  &.cf {
    margin-bottom: 20px;
  }

  & + .topic-title {
    height: auto;
    margin-bottom: 0;
    margin-top: 0;
    padding-left: 28px;
    position: relative;

    &:before {
      background: @iconsSprite no-repeat -54px -2138px;
      content: '';
      height: 16px;
      left: 10px;
      position: absolute;
      top: 14px;
      width: 8px;
    }
  }
}

.topic-description {
  margin-top: 0;
}

.sidebar-nav {
  &.topics {
    margin-top: 30px;

    > li {
      background-color: #fff;

      &.selected {
        > a,
        > a:visited {
          background: #f3f3f3;
          border: none;
          border-left: 4px solid #000;
          color: #000;
          font-weight: bold;

          &:before {
            content: none;
          }

          &:hover {
            color: #000;
          }
        }

        &.has-subtopics {
          > a {
            background: #fff;
          }
        }
      }

      > a,
      > a:visited, {
        color: #000;
        background: #fff;
        border: none;
        border-left: 4px solid #e7e7e7;
        text-transform: none;

        &:before {
          content: none;
        }

        &:hover {
          color: @textDarkBlue;
        }
      }

      &.subtopic-selected {
        > a,
        > a:visited {
          background: #fff;
          border-left: 4px solid #000;
        }
      }

      > ul {
        list-style: none;
        margin: 0;
        padding: 0;
        text-transform: none;

        > li {
          > a,
          > a:visited {
            background: #f3f3f3;
            border-left: none;
            color: #000;
            display: block;
            padding: 12px 20px;
            text-decoration: none;

            &:hover {
              color: @textDarkBlue;
            }
          }

          &.selected {
            > a,
            > a:visited {
              border-left: 4px solid #000;
              font-weight: bold;

              &:hover {
                color: #000;
              }
            }
          }
        }
      }
    }

    .html-rtl & > li {
      > a,
      > a:visited {
        border-left: none;
        border-right: 4px solid #e7e7e7;
      }

      &.selected {
        > a,
        > a:visited {
          border-right-color: #000;
        }
      }
    }
  }
}

#focus-and-refine {
  ul {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;

    li {
      float: left;
      margin: 5px 0 0;
      width: 50%;

      &.selected {
        font-weight: bold;

        a {
          color: @textGrey;
        }
      }

      &:nth-child(2n+1) {
        clear: left;
      }
    }
  }
}

#get-involved-button {
  text-align: center;

  .btn {
    font-size: 18px;
    padding: 9px 48px 12px;
  }

  &.document-get-involved {
    margin-top: 150px;
  }
}

#document-get-involved-button {
  text-align: center;

  .btn {
    font-size: 18px;
    padding: 9px 48px 12px;
  }
}

#document-list {
  margin-left: 100px;

  > h1 {
    font-weight: bold;
    margin: 0;
    padding: 0;

    &:before {
      content: none;
    }

    &.is-subtopic {
      &:before {
        background: url('../img/icon-chevron-right.png') no-repeat;
        background-size: 10px 18px;
        content: '';
        float: left;
        height: 18px;
        margin-left: -30px;
        width: 10px;
      }
    }
  }

  > ul {
    background: #fff;
    padding: 30px;

    &.topic-list {
      margin: 0;
      padding-left: 0;
    }

    > li {
      display: block;

      > a,
      > a:visited {
        color: #000;
        margin-bottom: 6px;
        font-family: @ZillaSlab;
        font-weight: bold;
      }

      a:hover {
        position: relative;
        text-decoration: underline;
        &:before {
          background: url('../img/icon-chevron-right.png') no-repeat;
          background-size: 10px 18px;
          content: '';
          display: block;
          height: 18px;
          left: -18px;
          padding-right: 8px;
          position: absolute;
          width: 10px;
        }
      }
    }
  }

  .separator {
    width: 100%;
    height: 2px;
    background: #000;
  }

  .topic-description {
    margin-top: 20px;
  }

  .html-rtl & {
    margin-left: 0;
    margin-right: 100px;

    > ul.topic-list {
      padding-left: 30px;
      padding-right: 0;
    }

    > ul > li a:hover:before {
      background-image: url('../img/icon-chevron-left.png');
      background-position: top right;
      left: auto;
      right: -18px;
      padding-left: 8px;
      padding-right: 0;
    }
  }
}

.html-rtl {
  .download-firefox {
    left: 20px;
    right: auto;
  }

  .download-thunderbird {
    left: 20px;
    right: auto;
  }

  h1.product-title .logo-sprite {
    float: right;
    margin: 0 0 0 8px;
  }
}

.documents-product-title {
  margin-left: 24px;
  position: relative;

  > img {
    float: left;
    padding-top: 2px;
  }

  > a:link,
    a:visited {
    color: #000;
    float: left;
    font-size: 16px;
    padding-left: 20px;
    padding-top: 6px;
    text-decoration: none;
    width: 110px;
  }

  .html-rtl & {
    margin-left: 0;
    margin-right: 24px;

    > img {
      float: right;
    }

    > a:link,
      a:visited {
        float: right;
        padding-left: 0;
        padding-right: 20px;
      }
  }
}

.download-buttons {
  display: block;
  height: 80px;

  > .download-firefox,
  > .download-thunderbird,
  > .refresh-firefox {
    padding-right: 75px;
  }

  &.documents-download-buttons {
    margin-top: 20px;

    > .download-firefox,
    > .download-thunderbird,
    > .refresh-firefox {
      padding-right: 10px;
    }
  }

  .html-rtl & {
    > .download-firefox,
    > .download-thunderbird,
    > .refresh-firefox {
      padding-left: 54px;
      padding-right: 0;
    }

    &.documents-download-buttons {
      > .download-firefox,
      > .download-thunderbird,
      > .refresh-firefox {
        padding-left: 10px;
        padding-right: 0;
      }
    }
  }
}

.download-thunderbird {
  .download-button-mixin();
}
